# Contributor: Iztok Fister, Jr. <iztok@iztok-jr-fister.eu>
# Maintainer: Iztok Fister, Jr. <iztok@iztok-jr-fister.eu>
pkgname=py3-pytest-qt
_pkgorig=pytest-qt
pkgver=4.4.0
pkgrel=1
pkgdesc="pytest plugin for Qt (PyQt5/PyQt6 and PySide2/PySide6) application testing"
url="https://github.com/pytest-dev/pytest-qt"
arch="noarch"
license="MIT"
depends="python3 py3-typing-extensions"
checkdepends="py3-pytest py3-qt5 xvfb-run"
makedepends="py3-setuptools_scm"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://files.pythonhosted.org/packages/source/p/pytest-qt/pytest-qt-$pkgver.tar.gz
	no-warnings.patch
	"
builddir="$srcdir/$_pkgorig-$pkgver"

build() {
	python3 setup.py build
}

check() {
	PYTHONPATH="$PWD"/src xvfb-run pytest -vv -k 'not test_wait_window and not test_basics'
}

package() {
	python3 setup.py install --skip-build --root="$pkgdir"
}

sha512sums="
57c6a1866c7685db5301faa42298f11ef3d3a030cbc72fb109a8d6166621625fac89365671f781e5c3d652a190567bec3bae6f12cdab20812f43c7ef8e4518fa  py3-pytest-qt-4.4.0.tar.gz
7e9f9a8022ce4af5993a411de9c804a09f3b4c51d8a95644bc8f0f1984b48ee238e03ed1c9bb96e0b4ddd90c2dba8de30987e47ff462829f8a3e0de2851317d2  no-warnings.patch
"
